/* 输出立方差*/
.LC0:
	.string "%d"

.LC1:
	.string "a-b=%d\n"

.LC2:
	.string "a^3-b^3=%d\n"


.globl main

main:
	pushq %rbp
	movq %rsp,%rbp
	subq $0x1000,%rsp

	movl $0,-0x1000(%rbp) /* a */
	movl $0,-0xffc(%rbp) /* b */

	leaq -0x1000(%rbp),%rsi /* a */
	leaq .LC0(%rip),%rdi 
	movl $0,%eax 
	call scanf 

	leaq -0xffc(%rbp),%rsi /* b */
	leaq .LC0(%rip),%rdi 
	movl $0,%eax 
	call scanf 

	movl -0x1000(%rbp),%edi /* a */
	call cubic 
	movl %eax,%ecx

	movl -0xffc(%rbp),%edi /* b */
	call cubic 
	subl %eax,%ecx
	cmpl $0,%ecx
	jl .Lmain_400

	movl %ecx,%esi 
	leaq .LC2(%rip),%rdi
	movl $0,%eax 
	call printf 

	jmp .Lmain_390
.Lmain_400:
	movl -0x1000(%rbp),%eax /* a */
	subl -0xffc(%rbp),%eax /* b */
	
	movl %eax,%esi
	leaq .LC1(%rip),%rdi 
	movl $0,%eax
	call printf 

.Lmain_390:
	movl $0,%eax
	leave
	ret


cubic:
	pushq %rbp
	movq %rsp,%rbp
	subq $0x1000,%rsp
	movl %edi,-0x1000(%rbp) /* a */

	movl -0x1000(%rbp),%eax
	imull %eax,%eax
	imull -0x1000(%rbp),%eax
	leave
	ret
